---
title: bud.fs.exists
description: Checks whether something exists on a given path.
sidebar_label: exists
---

Check whether something exists on a given path.

## Usage

`bud.fs.exists` returns different values depending on what is found at the given path.

- `false` if the path doesn't exist
- `dir` if the path is a directory
- `file` if the path is a file
- `other` if the none of the above

```typescript
const result = await bud.fs.exists(`path/to/dir`)
// result => `dir`
```

```typescript
const result = await bud.fs.exists(`not/a/path`)
// result => `false`
```
